package com.study.cloud.controller;

import com.study.cloud.entities.CommonResult;
import com.study.cloud.entities.Payment;
import com.study.cloud.service.PaymentFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping(value = "/consumer/")
public class OrderFeignController {
    @Autowired
    private PaymentFeignService paymentFeignService;

    @RequestMapping(value = "getPaymentById/{id}", method = RequestMethod.GET)
    public CommonResult<Payment> getPaymentByid(@PathVariable("id") Long id) {
        return paymentFeignService.getPaymentById(id);
    }
}
